package my.springboot3.service;

import my.springboot3.dto.PageDto;
import my.springboot3.dto.entity.Article;
import my.springboot3.dto.entity.Category;
import org.springframework.web.multipart.MultipartFile;

public interface ArticleService {


    /**
     * 根据id查询分类
     * @param id
     * @return
     */
    Category findById(Integer id);


    void update(Article article);

    void deleteById(Integer id);

    void add(Article article);

    /**
     * 分页查询所有文章
     */
    PageDto<Article> ListAll(Integer PageNum, Integer pageSize, Integer categoryId, String state);

    String upload(MultipartFile file);
}
